'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    const { ctx, logger } = this;
    logger.info(
      `[IP]: ${ctx.ip}`,
      `[IPS]: ${ctx.ips}`,
      `[USER-AGENT]: ${ctx.headers['user-agent']}`
    );
    ctx.redirect('http://weibo.com/');
  }
}

module.exports = HomeController;
